package org.fastframework.boot.data.jdbc.mysql.sql;

import org.fastframework.boot.data.jdbc.mysql.proxy.InvocationHandlerMybatis;

import java.lang.reflect.Proxy;

public class SqlSession {
    /**
     * 加载Mapper接口
     */
    public static <T> T getMapper(Class clazz) {
        return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class[]{clazz}, new InvocationHandlerMybatis());
    }
}
